<?php

/*
Process Setup/Edit Starter Kit (admin_starter_kit.pro.php)
*/

$rank_check = "7";
include "../global.inc.php";

if ($item_1) { $getI1 = fetch("SELECT * FROM items2 WHERE item_name = '$item_1' AND game = '$game'"); } if (!$getI1[id]) { die(header(error("Please make sure all items exsist in your game!", "admin_starter_kit.php?game=$game"))); }

if ($item_2) { $getI2 = fetch("SELECT * FROM items2 WHERE item_name = '$item_2' AND game = '$game'"); } if (!$getI2[id]) { die(header(error("Please make sure all items exsist in your game!", "admin_starter_kit.php?game=$game"))); }

if ($item_3) { $getI3 = fetch("SELECT * FROM items2 WHERE item_name = '$item_3' AND game = '$game'"); } if (!$getI3[id]) { die(header(error("Please make sure all items exsist in your game!", "admin_starter_kit.php?game=$game"))); }

if ($item_4) { $getI4 = fetch("SELECT * FROM items2 WHERE item_name = '$item_4' AND game = '$game'"); } if (!$getI4[id]) { die(header(error("Please make sure all items exsist in your game!", "admin_starter_kit.php?game=$game"))); }

if ($item_5) { $getI5 = fetch("SELECT * FROM items2 WHERE item_name = '$item_5' AND game = '$game'"); } if (!$getI5[id]) { die(header(error("Please make sure all items exsist in your game!", "admin_starter_kit.php?game=$game"))); }

mysql_query("DELETE FROM starter_items WHERE game = '$game'");
mysql_query("INSERT INTO starter_items (item_1,item_2,item_3,item_4,item_5,game) VALUES ('$getI1[id]','$getI2[id]','$getI3[id]','$getI4[id]','$getI5[id]','$game')");

header("Location: admin_starter_kit.php?game=$game&error=Your+kit+has+been+updated!");
?>
